﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpaceGame.Managers
{
    public enum GameState : int
    {
        Playing = 0,
        Paused = 1,
        GameOver = 2
    }

    public static class GameStateManager
    {
        public delegate void GameStateChangedEventHandler(GameState GameState);
        public static event GameStateChangedEventHandler GameStateChanged;

        private static GameState m_GameState;

        public static GameState GameState
        {
            get { return m_GameState; }
            set
            {
                m_GameState = value;
                if (GameStateChanged != null)
                    GameStateChanged.Invoke(value);
            }
        }
    }
}
